home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / c_course.zip / BACKWARD.C < prev    next >
Text File  |  1989-12-30  |  512b  |  23 lines

  1. main()
  2. {
  3. char line_of_char[80];
  4. int index = 0;
  5.  
  6.    strcpy(line_of_char,"This is a string.\n");
  7.  
  8.    forward_and_backwards(line_of_char,index);
  9.  
  10. }
  11.  
  12. forward_and_backward(line_of_char,index)
  13. char line_of_char[];
  14. int index;
  15. {
  16.    if (line_of_char[index]) {
  17.       printf("%c",line_of_char[index]);
  18.       index++;
  19.       forward_and_backward_call(line_of_char,index);
  20.    }
  21.    printf("%c",line_of_char[index]);
  22. }
  23.